package com.whfc.emp.service;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.emp.dto.AppFaceGateVisitorCheckDTO;
import com.whfc.emp.dto.AppFaceGateVisitorDTO;
import com.whfc.emp.dto.AppFaceGateVisitorNumDTO;
import com.whfc.emp.param.AppFaceGateVisitorAddParam;
import com.whfc.emp.param.AppFaceGateVisitorCheckAddParam;
import com.whfc.emp.param.AppFaceGateVisitorCheckParam;
import com.whfc.entity.dto.OssPathDTO;

import java.util.Date;

/**
 * @ClasssName AppFaceGateVisitorService
 * @Description 闸机访客人员审核
 * @Author hw
 * @Date 2021/2/26 10:56
 * @Version 1.0
 */
public interface AppFaceGateVisitorService {

    /**
     * 访客校验信息是否存在
     *
     * @param param
     * @return
     * @throws BizException
     */
    AppFaceGateVisitorCheckDTO checkAdd(AppFaceGateVisitorCheckAddParam param) throws BizException;

    /**
     * 访客申请
     *
     * @param param
     * @throws BizException
     */
    void add(AppFaceGateVisitorAddParam param) throws BizException;

    /**
     * 删除
     *
     * @param visitorId
     * @throws BizException
     */
    void del(Integer visitorId) throws BizException;

    /**
     * 审核
     *
     * @param param
     * @throws BizException
     */
    void check(AppFaceGateVisitorCheckParam param) throws BizException;


    /**
     * 访客审批列表
     *
     * @param deptId
     * @param pageSize
     * @param pageNum
     * @param state
     * @param startTime
     * @param endTime
     * @return
     * @throws BizException
     */
    PageData<AppFaceGateVisitorDTO> list(Integer deptId, Integer pageSize, Integer pageNum, Integer state, Date startTime, Date endTime) throws BizException;

    /**
     * 查询审核数量
     *
     * @param deptId
     * @param startTime
     * @param endTime
     * @return
     * @throws BizException
     */
    AppFaceGateVisitorNumDTO getNum(Integer deptId, Date startTime, Date endTime) throws BizException;


    /**
     * 访客审批列表导出
     *
     * @param deptId
     * @param state
     * @param startTime
     * @param endTime
     * @return
     * @throws BizException
     */
    OssPathDTO export(Integer deptId, Integer state, Date startTime, Date endTime) throws BizException;

    AppFaceGateVisitorDTO getByDeviceKeyAndGuid(String deviceKey, String personGuid);
}
